{extend name="template/base" /}
{block name="content"}
<div class="page-container">
    <form class="form form-horizontal" id="form" method="post" action="{:\\think\\Request::instance()->baseUrl()}">
        <input type="hidden" name="id" value="{$vo.id ?? ''}">
        <input type="hidden" class="input-text" placeholder="酒店时间价格" name="hotel_time_price_id" value="{$hotel_time_price.id ?? ''}" >
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">酒店名称：</label>
            <div class="formControls col-xs-6 col-sm-6">
                {$hotel_name ?? ''}
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">酒店房型：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <div class="select-box" style="width: 200px">
                    <select name="room_type_id" class="select">
                        {if empty($vo['room_type_id'])}
                            <option value="">请选择酒店的房型</option>
                        {/if}
                        {foreach $hotel_room_type as $hrt}
                            <option {if ($vo['room_type_id'] == $hrt['room_type_id'])} selected {/if} value="{$hrt.room_type_id}">{$hrt.type_name}</option>
                        {/foreach}
                    </select>
                </div>
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">房间价格：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" style="width: 150px;" placeholder="房间价格" name="room_price" value="{$vo.room_price ?? ''}" >
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <button type="submit" class="btn btn-primary radius">&nbsp;&nbsp;提交&nbsp;&nbsp;</button>
                <button type="button" class="btn btn-default radius ml-20" onClick="layer_close();">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
            </div>
        </div>
    </form>
</div>
{/block}
{block name="script"}
<script type="text/javascript" src="__LIB__/Validform/5.3.2/Validform.min.js"></script>
<script>
    $(function () {
        $("[name='room_type_id']").find("[value='{$vo.room_type_id ?? ''}']").attr("selected", true);;

        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });

        $("#form").Validform({
            tiptype: 2,
            ajaxPost: true,
            showAllError: true,
            callback: function (ret){
                ajax_progress(ret);
            }
        });
    })
</script>
{/block}
